package cloudEntity.enumation;

import lombok.Getter;

/**
 * @program: Smart School
 * @ClassName UserGenderEnum
 * @description:
 * @author: 陈智博
 * @create: 2025-05-15 15:44
 * @Version 1.0
 **/
@Getter
public enum UserGenderEnum {

    MAN("男",1),
    WOMAN("女",2),
    DEFAULT("无",3),
    ;

    private final String sysGenderName;
    private final Integer sysGenderType;

    UserGenderEnum(String sysGenderName, Integer sysGenderType) {
        this.sysGenderName = sysGenderName;
        this.sysGenderType = sysGenderType;
    }


    public static String getDescriptionByValue(Integer value) {
        for (UserGenderEnum status : UserGenderEnum.values()) {
            if (status.getSysGenderType().equals(value)) {
                return status.getSysGenderName();
            }
        }
        return null; // 或者抛出异常，根据需求而定
    }
}
